﻿using System;
using System.Collections.Generic;
using System.Text;
using TextEditor.TextDocument.Control;

namespace TextEditor.TextDocument.Action
{
    public class A_InsertNumInput : A_Action
    {
        public override string ActionName()
        {
            return "insertnuminput";
        }

        public override bool Execute()
        {
            using (frmSetMinOrMaxNumb setValue = new frmSetMinOrMaxNumb())
            {
                setValue.OnBackValue = InsertNumber;
                setValue.ShowDialog();
            }
            return true;
        }

        void InsertNumber(float f1, float f2)
        {
            base.myOwnerDocument._InsertNumInput(f1, f2);
        }



        public override bool isEnable()
        {
            return base.myOwnerDocument.CanModify();
        }
    }
}
